home *** CD-ROM | disk | FTP | other *** search
/ Carousel Volume 2 #1 / carousel.iso / mactosh / hc / growthre.sit / Growth Records / background_13488.txt < prev    next >
Text File  |  1988-02-06  |  8KB  |  353 lines

  1. -- background: 13488 from stack: in
  2. -- bmap block id: 19499
  3. -- flags: 0000
  4. -- background id: 0
  5. -- name: 
  6. ----- HyperTalk script -----
  7. on openBackground
  8.   global identification, ages, plotdata
  9.   push recent card
  10.   put "m" into field "sexes"
  11.   if plotdata is "true" then
  12.     click at 160,77
  13.     get line ages of field "age" in card identification
  14.     put (it*12) into months
  15.     put trunc (it) into field "years"
  16.     put round (months mod 12) into field "months"
  17.     get line ages of field "weight" in card identification
  18.     put it into field "height"
  19.     click at 107,316
  20.   end if
  21.   put "false" into plotdata
  22. end openBackground
  23.  
  24. function frameheight
  25. return 265
  26. end frameheight
  27.  
  28. function framewidth
  29. return 150
  30. end framewidth
  31.  
  32. function framebottom
  33. return 295
  34. end framebottom
  35.  
  36. function frameleft
  37. return 258
  38. end frameleft
  39.  
  40.  
  41.  
  42. -- part 1 (button)
  43. -- low flags: 00
  44. -- high flags: 0000
  45. -- rect: left=472 top=308 right=336 bottom=509
  46. -- title width / last selected line: 0
  47. -- icon id / first selected line: 1012 / 1012
  48. -- text alignment: 1
  49. -- font id: 0
  50. -- text size: 12
  51. -- style flags: 0
  52. -- line height: 16
  53. -- part name: Return
  54. ----- HyperTalk script -----
  55. on mouseUp
  56.   visual effect iris close
  57.   pop card
  58. end mouseUp
  59.  
  60.  
  61.  
  62. -- part 3 (button)
  63. -- low flags: 00
  64. -- high flags: 0000
  65. -- rect: left=230 top=311 right=336 bottom=257
  66. -- title width / last selected line: 0
  67. -- icon id / first selected line: 1014 / 1014
  68. -- text alignment: 1
  69. -- font id: 0
  70. -- text size: 12
  71. -- style flags: 0
  72. -- line height: 16
  73. -- part name: Prev
  74. ----- HyperTalk script -----
  75. on mouseUp
  76.   visual effect wipe right
  77.   go to previous card
  78. end mouseUp
  79.  
  80.  
  81.  
  82. -- part 4 (button)
  83. -- low flags: 00
  84. -- high flags: 2000
  85. -- rect: left=39 top=306 right=333 bottom=82
  86. -- title width / last selected line: 0
  87. -- icon id / first selected line: 0 / 0
  88. -- text alignment: 1
  89. -- font id: 0
  90. -- text size: 12
  91. -- style flags: 0
  92. -- line height: 16
  93. -- part name: Patterns
  94. ----- HyperTalk script -----
  95. on mouseUp
  96.   go to card id 5522
  97. end mouseUp
  98.  
  99.  
  100.  
  101.  
  102. -- part 5 (button)
  103. -- low flags: 00
  104. -- high flags: 0000
  105. -- rect: left=3 top=307 right=336 bottom=35
  106. -- title width / last selected line: 0
  107. -- icon id / first selected line: 21700 / 21700
  108. -- text alignment: 1
  109. -- font id: 0
  110. -- text size: 12
  111. -- style flags: 0
  112. -- line height: 16
  113. -- part name: Home
  114. ----- HyperTalk script -----
  115. on mouseUp
  116.   visual effect iris open
  117.   go Home
  118. end mouseUp
  119.  
  120.  
  121.  
  122. -- part 6 (button)
  123. -- low flags: 00
  124. -- high flags: A002
  125. -- rect: left=85 top=306 right=333 bottom=122
  126. -- title width / last selected line: 0
  127. -- icon id / first selected line: 0 / 0
  128. -- text alignment: 1
  129. -- font id: 0
  130. -- text size: 12
  131. -- style flags: 0
  132. -- line height: 16
  133. -- part name: plot
  134. ----- HyperTalk script -----
  135. on mouseUp
  136.   global identification, ages
  137.   put the userLevel into saveLevel
  138.   if the userLevel < 3 then set userLevel to 3 -- "Painting"
  139.   if the userLevel < 3 then exit mouseUp
  140.  
  141.   reset paint
  142.   choose rect tool
  143.   set lineSize to 1
  144.   set filled to true
  145.  
  146.   put frameLeft() into horiz
  147.   set cursor to 4 -- watchCursor
  148.   put identification into field "label"
  149.   repeat with i = 1 to ages
  150.     put frameBottom() into yaxis
  151.     get line i of field "age" in card identification
  152.     put it into years
  153.     put round(years*13.6) into yearsplot
  154.     get line i of field "weight" in card identification
  155.     put it into weight1
  156.     put round((weight1)*2.7) into weightplot
  157.     if it is not empty then
  158.       add horiz to yearsplot
  159.       subtract weightplot from yaxis
  160.       set pattern to 12
  161.       drawPlot yearsplot,yaxis
  162.     end if
  163.   end repeat
  164.   reset paint
  165.   choose browse tool
  166.   set userLevel to saveLevel
  167. end mouseUp
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174. -- part 7 (button)
  175. -- low flags: 00
  176. -- high flags: A003
  177. -- rect: left=141 top=73 right=91 bottom=191
  178. -- title width / last selected line: 0
  179. -- icon id / first selected line: 0 / 0
  180. -- text alignment: 1
  181. -- font id: 0
  182. -- text size: 12
  183. -- style flags: 0
  184. -- line height: 16
  185. -- part name: clear
  186. ----- HyperTalk script -----
  187. on mouseUp
  188.   put the userLevel into saveLevel
  189.   if the userLevel < 3 then set userLevel to 3 -- "Painting"
  190.   if the userLevel < 3 then exit mouseUp
  191.   clearScreen
  192.   reset paint
  193.   choose browse tool
  194.   set userLevel to saveLevel
  195.   put empty into field "label"
  196. end mouseUp
  197.  
  198.  
  199.  
  200. -- part 8 (field)
  201. -- low flags: 00
  202. -- high flags: 0000
  203. -- rect: left=271 top=24 right=38 bottom=451
  204. -- title width / last selected line: 0
  205. -- icon id / first selected line: 0 / 0
  206. -- text alignment: 1
  207. -- font id: 20
  208. -- text size: 10
  209. -- style flags: 0
  210. -- line height: 13
  211. -- part name: label
  212.  
  213.  
  214. -- part 9 (field)
  215. -- low flags: 00
  216. -- high flags: 4000
  217. -- rect: left=33 top=37 right=53 bottom=66
  218. -- title width / last selected line: 0
  219. -- icon id / first selected line: 0 / 0
  220. -- text alignment: 1
  221. -- font id: 20
  222. -- text size: 12
  223. -- style flags: 0
  224. -- line height: 16
  225. -- part name: years
  226.  
  227.  
  228. -- part 10 (field)
  229. -- low flags: 00
  230. -- high flags: 4000
  231. -- rect: left=74 top=37 right=53 bottom=109
  232. -- title width / last selected line: 0
  233. -- icon id / first selected line: 0 / 0
  234. -- text alignment: 1
  235. -- font id: 20
  236. -- text size: 12
  237. -- style flags: 0
  238. -- line height: 16
  239. -- part name: months
  240.  
  241.  
  242. -- part 11 (field)
  243. -- low flags: 01
  244. -- high flags: 4000
  245. -- rect: left=137 top=37 right=53 bottom=175
  246. -- title width / last selected line: 0
  247. -- icon id / first selected line: 0 / 0
  248. -- text alignment: 1
  249. -- font id: 20
  250. -- text size: 12
  251. -- style flags: 256
  252. -- line height: 16
  253. -- part name: sexes
  254.  
  255.  
  256. -- part 12 (field)
  257. -- low flags: 00
  258. -- high flags: 4000
  259. -- rect: left=51 top=64 right=80 bottom=129
  260. -- title width / last selected line: 0
  261. -- icon id / first selected line: 0 / 0
  262. -- text alignment: 1
  263. -- font id: 20
  264. -- text size: 12
  265. -- style flags: 0
  266. -- line height: 16
  267. -- part name: height
  268.  
  269.  
  270. -- part 13 (button)
  271. -- low flags: 00
  272. -- high flags: 2000
  273. -- rect: left=72 top=12 right=30 bottom=145
  274. -- title width / last selected line: 0
  275. -- icon id / first selected line: 0 / 0
  276. -- text alignment: 1
  277. -- font id: 0
  278. -- text size: 12
  279. -- style flags: 0
  280. -- line height: 16
  281. -- part name: Quickplot
  282. ----- HyperTalk script -----
  283. on mouseUp
  284.   put field "years" into years
  285.   put field "months" into months
  286.   put field "height" into height
  287.   divide months by 12
  288.   add months to years
  289.   put the userLevel into saveLevel
  290.   if the userLevel < 3 then set userLevel to 3 -- "Painting"
  291.   if the userLevel < 3 then exit mouseUp
  292.   reset paint
  293.   choose rect tool
  294.   set lineSize to 1
  295.   set filled to true
  296.   put frameLeft() into horiz
  297.   put frameBottom() into yaxis
  298.   set cursor to 4 -- watchCursor
  299.   put round(years*13.6) into yearsplot
  300.   put round((height)*2.7) into heightplot
  301.   add horiz to yearsplot
  302.   subtract heightplot from yaxis
  303.   set pattern to 12
  304.   drawPlot yearsplot,yaxis
  305.   reset paint
  306.   choose browse tool
  307.   set userLevel to saveLevel
  308.  
  309. end mouseUp
  310.  
  311.  
  312.  
  313. -- part 14 (button)
  314. -- low flags: 00
  315. -- high flags: 0000
  316. -- rect: left=261 top=311 right=336 bottom=288
  317. -- title width / last selected line: 0
  318. -- icon id / first selected line: 1013 / 1013
  319. -- text alignment: 1
  320. -- font id: 0
  321. -- text size: 12
  322. -- style flags: 0
  323. -- line height: 16
  324. -- part name: Next
  325. ----- HyperTalk script -----
  326. on mouseUp
  327.   visual effect wipe left
  328.   go to next card
  329. end mouseUp
  330.  
  331.  
  332.  
  333. -- part 15 (button)
  334. -- low flags: 00
  335. -- high flags: 2000
  336. -- rect: left=421 top=245 right=285 bottom=490
  337. -- title width / last selected line: 0
  338. -- icon id / first selected line: 0 / 0
  339. -- text alignment: 1
  340. -- font id: 0
  341. -- text size: 12
  342. -- style flags: 0
  343. -- line height: 16
  344. -- part name: New Button
  345. ----- HyperTalk script -----
  346. on mouseUp
  347.   global plotdata
  348.   put "true" into plotdata
  349.   go to card id 21402
  350. end mouseUp
  351.  
  352.  
  353.